During development of a new software program, the resulting program may be modified and reviewed for any errors, or "bugs." This process, commonly referred to as "debugging," is often time consuming and requires skill and patience of the programmer attempting to provide a functional software program. Many debugging tools and techniques have been developed to help alleviate the difficulties faced by the developer.
For example, a common debugging techniques inserts "print statements" throughout the software program in an attempt to locate the source of an error. While the random insertion of print statements in a faulty program allows the programmer to take initial steps to locate an error, the use of such print statements is inefficient and often ineffective. For example, print statements are typically inserted into a software program on a "trial and error" basis. Thus, the programmer must either use a separate methodology for determining an initial location of an error in a program, or scatter a large number of print statements throughout the program to glean some clues from the insertion thereof. Additionally, the more subtle the problem in the software program, the less likely the programmer is to choose the proper location for insertion of the print statements. Thus, the use of print statements to debug software programs may result in the inefficient use of programming resources.
The problems associated with debugging traditional software programs are exacerbated by the debug deficiencies found in many newer programming languages. For example, JavaScript is a new programming language that has been developed for use on the communication network known as the Internet. JavaScript does not provide a great number of debugging tools and, therefore, debugging a JavaScript program becomes an even more challenging debugging task. For instance, should the print statement debug process be used and ad hoc statements utilized to print out information to attempt to locate errors, such statements must be provided in Hypertext Markup Language (HTML). Additionally, the HTML code must be appropriately configured for display on the programmer's display. Thus, HTML code including debugging information as well as control information (such as new lines, separators and the like) for displaying the statements, must be provided to implement the concepts embodied in print statement debugging techniques.
The problems associated with executing print-type statements within a JavaScript program are further compounded by the programmers' requirements the values of variables used in the software program be provided at a moment before the error occurs during execution of the software program. It should be noted that variables may be objects in JavaScript. For clarity, an example will be provided to define the difference between objects and variables. In one instance, an object may be called a person. The person object might then have variables and objects associated therewith, such as the person's name, phone number, address, and salary history. The person's name might be an object having the first, middle, and last names of the person identified as variables. Additionally, the address might be an object, where the street number, city and zip code are each a variable included within the address object.
In most programming languages, a programmer knows the contents of an object because the programmer created the object. For example, C++ is an object-oriented software programming language, wherein all objects are defined before the program is written and these definitions may subsequently be used during the debugging process. However, JavaScript is an interpretive programming language that allows the programmer to describe objects dynamically. Thus, JavaScript allows a programmer to have the capability to add new properties to objects as the program is executed. Therefore, in situations in which a software program has been written by more than one person, some objects may include unanticipated properties. While this JavaScript capability provides the flexibility desired for interactive Internet usage, a programmer performing a debugging operation is unable to actually know characteristics of objects that are used within the JavaScript program until execution of that program. Therefore, if during the debugging process, the programmer desires to determine values of the variables or objects used during execution of the JavaScript program, the programmer currently has no method for doing so.
Furthermore, even when data is retrieved to provide a value for the variables or objects used during execution of the JavaScript program, that data often includes codes for information that are not discernable to an external user or programmer. Such confusing codes often hinder a programmer's ability to effectively debug a software program, where the programmer does not know or must manually translate the received codes into a more understandable description of the information. Furthermore, given that JavaScript is a scripting language that is supported by multiple platforms, local operating systems must be able to evaluate the received codes to correctly utilize the information transferred therewith.
Additionally, even when debugging statements are utilized to evaluate and correct faulty software code, it may often be desirable to disable the debugging statements in the production software code so that they can subsequently be enabled to analyze problems. However, should the software code already be sold to a client such that the debugging statements may not be enabled, such debugging statements are not useful. In such situations, it is not possible for the programmer to enable the statements by changing a hard-coded variable in the compiled code. Additionally, even if it is possible to enable the statements, current debugging techniques do not allow a programmer to selectively enable only certain portions of a code section being debugged.
Additionally, even should such debugging statements be enabled after the code is produced and sold to a client, service personnel are typically unable to control the contents of the JavaScript client object directly. Thus, the service personnel do not have a vital and effective tool of viewing the contents of the client object at will as JavaScript does not directly provide these capabilities. This limitation severely restricts the ability of support personnel to help a user of the software code to implement that code within their system. Typically, the users of the software code is forced to either obtain different code or debug the code on their own.
Therefore, a need exists for a method and data processing system for debugging interpretive programming languages, such as JavaScript, in a manner that provides programmers with the information required to effectively debug the program in a timely and efficient manner. Additionally, the data processing system and method for debugging the JavaScript program should be implemented in a manner that allows service personnel supporting the JavaScript application to aid a client in debugging the program on the client's system without requiring service personnel to travel to the client's location. Furthermore, there exists a need for a mechanism that provides information about an object or variable in JavaScript and in other interpretive programming language programs. Each of the aforementioned needs should be addressed with a device and methodology that provides more information with less programming requirements and that is easily enabled and disabled.